﻿@model CSF.Products.Data.ProductPartType?
@using CSF.Products.Data;

@functions {
    IEnumerable<SelectListItem> GetPartTypeList(CSF.Products.Data.ProductPartType? value)
    {
        return new SelectListItem[] {
            new SelectListItem { Value=CSF.Products.Data.ProductPartType.Product.ToString(), Text="Product", Selected=(value==ProductPartType.Product)},
            new SelectListItem { Value=CSF.Products.Data.ProductPartType.Material.ToString(), Text="Material", Selected=(value==ProductPartType.Material)},
            new SelectListItem { Value=CSF.Products.Data.ProductPartType.Part.ToString(), Text="Part", Selected=(value==ProductPartType.Part)},
            new SelectListItem { Value=CSF.Products.Data.ProductPartType.Service.ToString(), Text="Service", Selected=(value==ProductPartType.Service)}
        };
    }
}
@Html.DropDownList("", GetPartTypeList(Model))

